﻿using NPOI.POIFS.Storage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS_Entity.Dto.AutoEquipmentDto;
using WCS_Entity.Dto.TaskDto;
using WCS_Entity.Entity;
using WCS_Entity.Rcs;
using WCS_Service.Models;

namespace WCS_Service.Interface
{
    /// <summary>
    /// 任务管理服务接口
    /// </summary>
    public interface ITaskService : IBaseService<TaskEntity>
    {
        Task<TaskCreatResultModel> CreateTaskAsync(CreatTaskDto dto);
        Task<TaskDto> UpdateTaskAsync(UpdateTaskDto dto);
        Task<TaskDto> QueryTaskAsync(int id);
        Task<List<TaskDto>> QueryAllTaskAsync();
        Task<List<TaskDto>> QueryTaskBaseTypeAsync(string type);

        Task<TaskDto> QueryTaskBaseRcsTaskCodeAsync(string code);

        Task<bool> DeleteTaskAsync(int id);
        Task<List<TaskDto>> QueryCompleteTaskAsync();
        Task<List<TaskDto>> QueryErrTaskAsync();
        Task<List<TaskDto>> QueryWaitTaskAsync(string type,bool isReadOnly=false);
        Task<List<TaskDto>> QueryWaitTaskBaseAreaCode(string areaCode,bool isReadOnly = false);
        Task<bool> UpdateTaskStateAsync(UpdateTaskStateDto dto);
        Task<List<string>> UpdateTaskStateBaseAgvIdAsync(string agvId);
        Task<TaskDto> UpdateTaskStateBaseRcsTaskIdAsync(string rcsTaskId);
        Task<TaskDto> UpdateRcsTaskCodeBaseId(int id,string rcsTask);
        Task FallbackStateBaseAgvIdAsync(string agvId);
    }
}
